<?php
require_once("../../PathHelper.php");
require_once $rootPath.'Gazzetta.BL/RSSLoader.php';
require_once $rootPath.'Gazzetta.DAL/Repositories/RSSItemRepository.php';
require_once $rootPath.'Gazzetta.Entities/RSSItem.php';
try 
{
    
	$rssLoader = new RSSLoader();
	$results = $rssLoader->getRSSItemsByCategory("Deportes", 2);
    
    foreach ($results as $rssItem)
    {
        echo "Title: ".$rssItem->getTitle();
        echo "</br>";
        echo "Description: ".$rssItem->getDescription();
        echo "</br>";
        echo "Image: ".$rssItem->getImageLink();
        echo "</br>";
        echo "Link: ".$rssItem->getLink();
        echo "</br>";
    }
    
	
} 
catch (Exception $e)
{
	echo ' ' . $e->getMessage();
}

?>